<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<div th:replace="fragment/headFragment:: head"></div>
<body class="cbp-spmenu-push">
<div class="main-content">
    <!--left-fixed -navigation-->
    <div th:replace="fragment/left_sidebar:: left_sidebar"></div>
    <!--left-fixed -navigation-->
    <!-- header-starts -->
    <div th:replace="fragment/header_section::header_section"></div>
    <!-- //header-ends -->
    <!-- main content start-->
    <div id="page-wrapper">
        <div class="main-page">
            <div class="panel-body widget-shadow">
                <h4 th:text="${main}">Basic Table:</h4>


                <div class="inline-form widget-shadow">
                    <div class="form-body">
                        <div data-example-id="simple-form-inline">
                            <form class="form-inline" th:action="@{/blackList/select(current=1,size=10)}" method="post">
                                <div class="form-group">客服id:
                                    <input type="number" class="form-control" name="customerserviceid"
                                           oninput="if(value<=0)value=1">
                                </div>
                                <div class="form-group">客户id:
                                    <input type="number" class="form-control" name="customerid"
                                           oninput="if(value<=0)value=1">
                                </div>
                                <button type="submit" class="btn btn-default">查询</button>

                                <a th:href="@{/blackList/add}">
                                    <button type="button" class="btn btn-default" style="text-align: center">添加
                                    </button>
                                </a>

                                <table class="table">
                                    <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>操作客服id</th>
                                        <th>封禁客户id</th>
                                        <th>理由</th>
                                        <th>时间</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr th:each="cs, rowInfo : ${list}">
                                        <td th:text="${rowInfo.count}"></td>
                                        <td th:text="${cs.getCustomerserviceid()}"></td>
                                        <td th:text="${cs.getCustomerid()}"></td>
                                        <td th:text="${cs.getReason()}"></td>
                                        <td th:text="${cs.getTime()}"></td>
                                        <td>
                                            <a th:href="@{/blackList/update(customerid = ${cs.getCustomerid()},current=${#request.getParameter('current')},size=10)}">详情</a>
                                            <a th:href="@{/blackList/delete(customerid = ${cs.getCustomerid()},current=${#request.getParameter('current')},size=10)}">解禁</a>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>


                                <div style="text-align: center">
                                    <a th:href="@{/blackList/index(current=1,size=10)}">首页</a>
                                    <a th:href="@{/blackList/index(current=${i},size=10)}"
                                       th:each="i : ${#numbers.sequence(1,pagesCount)}">
                                        <span th:text="${i}"
                                              style="border: 1px solid #e3e3e3; height: 16px;width: 16px;text-align: center;vertical-align: middle;padding-left: 5px;padding-right: 5px;margin-left: 10px">1</span>
                                    </a>
                                    <a th:href="@{/blackList/index(current=${pagesCount},size=10)}">尾页</a>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>


            </div>
        </div>
    </div>
    <!--footer-->
    <div class="footer">
        <p>Copyright &copy; 2021.Igeek All rights reserved.</p>
    </div>
    <!--//footer-->
</div>
<!-- Classie -->
<script src="js/classie.js"></script>
<script>
    var menuLeft = document.getElementById('cbp-spmenu-s1'),
        showLeftPush = document.getElementById('showLeftPush'),
        body = document.body;

    showLeftPush.onclick = function () {
        classie.toggle(this, 'active');
        classie.toggle(body, 'cbp-spmenu-push-toright');
        classie.toggle(menuLeft, 'cbp-spmenu-open');
        disableOther('showLeftPush');
    };


    function disableOther(button) {
        if (button !== 'showLeftPush') {
            classie.toggle(showLeftPush, 'disabled');
        }
    }
</script>
<!--scrolling js-->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!--//scrolling js-->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.js"></script>
</body>
</html>